<?php

use think\migration\Migrator;


class AlterConfigCouponBrandPlatformPremium extends Migrator
{
    public function up()
    {
        $rate = 2;
        \app\model\Config::findOrCreate([
            'type'  => 'coupon',
            'name'  => '平台全局溢价比例',
            'field' => 'platform_global_premium_ratio',
            'value' => $rate,
        ]);
    }

    public function down()
    {
        \app\model\Config::destroy(['type' => 'coupon', 'field' => 'platform_global_premium_ratio']);
    }
}
